import time

from playwright.sync_api import sync_playwright

browser_boot = sync_playwright().start()

browser = browser_boot.chromium.launch(headless=False)

page = browser.new_page()
page.goto("https://www.baidu.com")
print(page.title())

page.locator('#chat-textarea').fill('机械键盘双击')
page.locator('#chat-submit-button').click()

time.sleep(10)